﻿using Centny.PdfReader.Types;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Centny.PdfReader.Pdf
{
    public class PdfClassObject : PdfObject
    {
        public PdfClass InnerObj { get; set; }

        public PdfDictionary AsDictionary
        {
            get
            {
                return this.InnerObj as PdfDictionary;
            }
        }
        public PdfArray AsArray
        {
            get
            {
                return this.InnerObj as PdfArray;
            }
        }
        public PdfLong AsLong
        {
            get
            {
                return this.InnerObj as PdfLong;
            }
        }

        public PdfClass this[String n]
        {
            get
            {
                return this.AsDictionary[n];
            }
            set
            {
                this.AsDictionary[n] = value;
            }
        }
        public PdfClass this[PdfName n]
        {
            get
            {
                return this.AsDictionary[n];
            }
            set
            {
                this.AsDictionary[n] = value;
            }
        }
        public PdfClass this[int i]
        {
            get
            {
                return this.AsArray[i];
            }
            set
            {
                this.AsArray[i] = value;
            }
        }

    }
}
